Problem: Margo walks to her friend's house in 10 minutes. Using the same route, it takes Margo 20 minutes to get back home. If her average walking rate for the entire trip is 4 miles per hour, how many total miles did she walk?
Margo walked for a total of $10+20=30$ minutes, or 0.5 hours.  To find the total distance traveled, we can multiply the total time by the rate: \begin{align*}
\text{distance}&=\text{rate}\times \text{time} \\
&=0.5\times 4 \\
&=\boxed{2}\text{ miles}.
\end{align*}